package per.zhang.vaccinesys.serverConsumer.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import per.zhang.vaccinesys.serverConsumer.base.dto.ResultDTO;
import per.zhang.vaccinesys.serverConsumer.base.page.PageList;
import per.zhang.vaccinesys.serverConsumer.dto.request.AppointmentRequestDTO;
import per.zhang.vaccinesys.serverConsumer.dto.respone.AppointmentRespondDTO;
import per.zhang.vaccinesys.serverConsumer.entity.Appointment;

import java.util.Date;

@FeignClient("service-provider")
public interface AppointmentService {

    public static final String POR_URL = "/appointment";


    /**
     * 用户预约打疫苗
     * @param appointment
     * @return
     * @throws Exception
     */
    @PostMapping(POR_URL+"/userAppointment")
    ResultDTO<Appointment> userAppointment(Appointment appointment)throws Exception;

    /**
     * 用户取消疫苗
     * @param appointment
     * @return
     * @throws Exception
     */
    @PostMapping(POR_URL+"/userCancelAppointment")
    ResultDTO<Appointment> userCancelAppointment(Appointment appointment)throws Exception;

    /**
     * 用户查看预约
     * @param appointmentRequestDTO
     * @return
     * @throws Exception
     */
    @PostMapping(POR_URL+"/getAppointmentPage")
    ResultDTO<PageList<AppointmentRespondDTO>> selectEntityPage(AppointmentRequestDTO appointmentRequestDTO)throws Exception;

}
